<script setup>
import Aside from '../components/Aside.vue';
import { defineAsyncComponent } from 'vue'
import { shallowRef } from 'vue'
import { selectIndex } from '../api/get/indexData'
const AdminVue = defineAsyncComponent(() => import('../components/Admin.vue'))
</script>
<template>
    <div class="common-layout">
        <el-container>
            <el-aside width="250px" style="margin-top:0 ;background:fixed rgb(34,45,50);height: 100vh;">
                <Aside></Aside>
            </el-aside>
            <el-main id="ihead" style="height: 100vh;margin:0 5px;">
                <AdminVue :pageData="pageData"></AdminVue>
            </el-main>
        </el-container>
    </div>
</template>
<!-- style="background:fixed #545c64;  background-size: cover;" -->
<script>
export default {
    data() {
        return {
            pageData: {}
        }
    }, mounted() {
        selectIndex(this.$store.state.user.id).then((res) => {
            console.log("index", res)
            this.pageData=res.data.data
            this.$store.commit('setIndexData', res.data.data)
        })
    }
}
</script>
  